package nc.bs.swjw.util;

import nc.vo.pub.BusinessException;
import nc.vo.pub.lang.UFBoolean;
import java.util.*;

public class queryParamHandlerUtil {
    /**
     * 获取科目余额表查询参数
     * @param map
     * @return
     * @throws BusinessException
     */
    public static Map<String,Object> getKMYEQueryParam(Map map) throws BusinessException {
        Map<String, Object> param = new HashMap<>();
        param.put("pk_accountingbook" , Arrays.asList(map.get("pk_accountingbook")));
        param.put("pk_unit" , new ArrayList());
        param.put("pk_liabilitycenter" ,new ArrayList<>());
        param.put("multbusi" , UFBoolean.FALSE);
        param.put("multliabcenter" , UFBoolean.FALSE);
        param.put("usesubjversion" ,"N");
        param.put("versiondate" ,null);
        param.put("subjVersionShow" ,"0000-00-00"); // 2025-01-01,
        param.put("startlvl" ,1);
        param.put("endlvl" ,8);
        param.put("isleave" ,"Y");
        param.put("isoutacc" ,"N");
        Object month = map.get("month");
        Object year = map.get("year");
        param.put("startyear" ,year);// 2024
        param.put("endyear" ,year); // 2024
        param.put("startperiod" , month); // 12
        param.put("endperiod" ,month); // 12
        Object startdate = map.get("startdate");
        Object enddate = map.get("enddate");
        param.put("startdate" ,startdate); // 2024-12-01
        param.put("enddate" ,enddate); //  2024-12-31 23:59:59
        param.put("multiYearMerge" , UFBoolean.FALSE);
        param.put("includeuntally" ,"Y");
        param.put("includeerror" ,"Y");
        param.put("includeplcf" ,"Y");
        param.put("includerc" ,"N");
        param.put("pk_currtype" ,"本币");
        param.put("returncurr" ,"1");
        param.put("mutibook" ,"N");
        param.put("showzerooccur" ,"N");
        param.put("showzerobalance" ,"N");
        param.put("showzerobalanceoccur" ,"Y");
        param.put("currplusacc" ,"Y");
        param.put("sumbysubjtype" ,"N");
        param.put("balanceori" ,"-1");
        param.put("twowaybalance" ,"N");
        param.put("querybyperiod" ,"true");
        param.put("pk_accasoa" ,new ArrayList<>());
        param.put("pk_fccurrtype","");
        param.put("fcrate" ,"");
        param.put("subjectType","0");
        param.put("returnSubjectType","1");
        param.put("appcode","20023005");
        return param;
    }
}
